package com.hl.security;

import org.springframework.security.core.GrantedAuthority;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

/**
 * Created by aaron on 2016/3/25.
 */
public class UserDetail extends  org.springframework.security.core.userdetails.User {


    private String name;

    private boolean isLeader;

    private String roleGroup;

    private String roleGroupId;

    private String phone;

    private String realName;

    private String taobaotoken;

    private List<String> resourceUrls=new ArrayList<String>();

    /**
     * Calls the more complex constructor with all boolean arguments set to {@code true}.
     *
     * @param username
     * @param password
     * @param authorities
     */
    public UserDetail(String username, String password, Collection<? extends GrantedAuthority> authorities, String name, String realName) {
        super(username, password, authorities);
        this.name = name;
        this.realName = realName;
        this.resourceUrls.add("/");
        //this.resourceUrls.add("/hello");
    }

    public List<String> getResourceUrls() {
        return resourceUrls;
    }

    public void setResourceUrls(List<String> resourceUrls) {
        this.resourceUrls = resourceUrls;
    }
}
